import axios from '@/libs/api.request'
import { getToken } from '@/libs/util'
// =============== news-system/advertisements/list.vue =========================
let auth_token = getToken();
//首页
//export const getTableData = (page_current, page_size, searchData) => {
//return axios.request({
//  url: 'api/cuser.dot/index',
//  params: {
//    page_current: page_current,
//    page_size: page_size,
//    auth_token:auth_token,
//    search_data: JSON.stringify(searchData)
//  },
//  method: 'get'
//})
//}

//钱包
export const getMoney = () => {
  return axios.request({
    url: 'api/v1.cuser.money/index',
    params: {
      auth_token:auth_token,
    },
    method: 'get'
  })
}

//提现申请列表
export const getGash = (page_current, page_size, searchData) => {
  return axios.request({
    url: 'api/v1.cuser.money/apply_gcash_index',
    params: {
      page_current: page_current,
      page_size: page_size,
      auth_token:auth_token,
      status:searchData.status,
    },
    method: 'get'
  })
}


//账单列表
export const getBill = (page_current, page_size, searchData) => {
  return axios.request({
    url: 'api/v1.cuser.money/bill_index',
    params: {
      page_current: page_current,
      page_size: page_size,
      auth_token:auth_token,
    },
    method: 'get'
  })
}

//账单列表
export const getBillInfo = (bill_id) => {
  return axios.request({
    url: 'api/v1.cuser.money/bill_read',
    params: {
      bill_id:bill_id,
      auth_token:auth_token
    },
    method: 'get'
  })
}


//提现申请列表
export const getRefund = (page_current, page_size, searchData) => {
  return axios.request({
    url: 'api/v1.cuser.money/apply_refund_index',
    params: {
      page_current: page_current,
      page_size: page_size,
      auth_token:auth_token,
      status:searchData.status,
    },
    method: 'get'
  })
}

//邀请码
export const getCode = () => {
  return axios.request({
    url: 'api/v1.cuser.car_user/invite_code',
    params: {
      auth_token:auth_token,
    },
    method: 'get'
  })
}


//消息
export const getMessage = (page_current, page_size, searchData) => {
  return axios.request({
    url: 'api/v1.cuser.message/index',
    params: {
      page_current: page_current,
      page_size: page_size,
      auth_token:auth_token,
    },
    method: 'get'
  })
}

//账单列表
export const getMessageInfo = (msg_id) => {
  return axios.request({
    url: 'api/v1.cuser.message/read',
    params: {
      msg_id:msg_id,
      auth_token:auth_token
    },
    method: 'get'
  })
}


//筛选数据
export const getData = () => {
  return axios.request({
    url: 'api/v1.cuser.index/get_data',
    params: {
      auth_token:auth_token,
    },
    method: 'get'
  })
}
